﻿using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace HML.Design
{
    /// <summary>
    /// AnnulusProgress控件设计模式行为
    /// </summary>
    public class AnnulusProgressDesigner : ControlDesigner
    {
        public override SelectionRules SelectionRules
        {
            get
            {
                return base.SelectionRules & ~(SelectionRules.TopSizeable | SelectionRules.LeftSizeable);
            }
        }

        public override void InitializeNewComponent(IDictionary defaultValues)
        {
            base.InitializeNewComponent(defaultValues);

            AnnulusProgress annulusProgress = (AnnulusProgress)this.Component;
            MemberDescriptor member = (MemberDescriptor)TypeDescriptor.GetProperties((object)this.Component)["Value"];
            this.RaiseComponentChanging(member);
            annulusProgress.Value = 35;
            this.RaiseComponentChanged(member, (object)null, (object)null);

        }
    }
}
